/*
 * CardValidationService.java
 *
 * Created on 10 May 2007, 22:58
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package usyd.comp5348;

import java.util.Random;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author Yuezhong Zhang
 */
@WebService()
public class CardValidationService {
    
    static Random rand = new Random();
    
    /**
     * Web service operation
     */
    @WebMethod
    public boolean validate_ccard(@WebParam(name = "card_no") String card_no, @WebParam(name = "name") String name, @WebParam(name = "expiry_date") String expiry_date) {
        return (rand.nextFloat()<0.9f);
    }
    
}
